class DutdetransController < ApplicationController
  # GET /dutdetrans
  # GET /dutdetrans.xml
  def index
    @dutdetrans = Dutdetran.find(:all)

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @dutdetrans }
    end
  end

  # GET /dutdetrans/1
  # GET /dutdetrans/1.xml
  def show
    @dutdetran = Dutdetran.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @dutdetran }
    end
  end

  # GET /dutdetrans/new
  # GET /dutdetrans/new.xml
  def new
    @dutdetran = Dutdetran.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @dutdetran }
    end
  end

  # GET /dutdetrans/1/edit
  def edit
    @dutdetran = Dutdetran.find(params[:id])
  end

  # POST /dutdetrans
  # POST /dutdetrans.xml
  def create
    @dutdetran = Dutdetran.new(params[:dutdetran])

    respond_to do |format|
      if @dutdetran.save
        flash[:notice] = 'Dutdetran was successfully created.'
        format.html { redirect_to(@dutdetran) }
        format.xml  { render :xml => @dutdetran, :status => :created, :location => @dutdetran }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @dutdetran.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /dutdetrans/1
  # PUT /dutdetrans/1.xml
  def update
    @dutdetran = Dutdetran.find(params[:id])

    respond_to do |format|
      if @dutdetran.update_attributes(params[:dutdetran])
        flash[:notice] = 'Dutdetran was successfully updated.'
        format.html { redirect_to(@dutdetran) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @dutdetran.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /dutdetrans/1
  # DELETE /dutdetrans/1.xml
  def destroy
    @dutdetran = Dutdetran.find(params[:id])
    @dutdetran.destroy

    respond_to do |format|
      format.html { redirect_to(dutdetrans_url) }
      format.xml  { head :ok }
    end
  end
end
